package com.lantosec.hmrp.modules.system.vo;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import java.io.Serializable;
import com.lantosec.hmrp.modules.system.entity.SysDictionaries;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 数据字典表 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-02-11
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="SysDictionaries对象", description="数据字典表")
public class SysDictionariesVO extends BaseVO<SysDictionaries> {
    private static final long serialVersionUID = 1L;


    public SysDictionariesVO(SysDictionaries entity){
        this.dictionariesId = entity.getDictionariesId();
        this.dictionariesName = entity.getDictionariesName();
        this.dictionariesShowName = entity.getDictionariesShowName();
        this.dictionariesCode = entity.getDictionariesCode();
        this.parentId = entity.getParentId();
        this.leaf = entity.getLeaf();
        this.remark = entity.getRemark();
        this.allowDel = entity.getAllowDel();
        this.dictionariesOrder = entity.getDictionariesOrder();
        this.flag = entity.getFlag();
    }

    @Override
    public SysDictionaries convertToEntity(){
        return new SysDictionaries(this);
    }


    @ApiModelProperty(value = "字典ID")
    private String dictionariesId;

    @ApiModelProperty(value = "名称(唯一性)")
    private String dictionariesName;

    @ApiModelProperty(value = "显示名称")
    private String dictionariesShowName;

    @ApiModelProperty(value = "字典编码")
    private String dictionariesCode;

    @ApiModelProperty(value = "上级ID")
    private String parentId;

    @ApiModelProperty(value = "是否末级(0否,1是)")
    private Integer leaf;

    @ApiModelProperty(value = "说明")
    private String remark;

    @ApiModelProperty(value = "是否允许删除")
    private Integer allowDel;

    @ApiModelProperty(value = "排序")
    private Integer dictionariesOrder;

    @ApiModelProperty(value = "是否删除")
    private Boolean flag;


}
